class Solution {
public:int countNegatives(vector<vector<int>>& grid) {int row &#61; grid.size();int col &#61; grid[0].size();int count &#61; 0;for(int i &#61; 0; i < row; i&#43;&#43;){for(int j &#61; 0; j < col; j&#43;&#43;){if(grid[i][j] < 0){count&#43;&#43;;}}}return count;}
};